package com.inmarry.action;

import javax.servlet.*;
import javax.servlet.http.*;
import java.util.Date;

import org.apache.struts.action.*;
import org.apache.struts.util.*;
import org.apache.struts.validator.*;

public final class Logout extends Action {
    
    public ActionForward execute(
            ActionMapping mapping,
            ActionForm form,
            HttpServletRequest req,
            HttpServletResponse res) throws Exception {
        
        HttpSession session = req.getSession(true);
        
        if ( session.getAttribute("user") != null ) {
            session.removeAttribute("user");
        }

        return new ActionForward(mapping.findForward("index"));

    }

}
